home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 9
/
QRZ Ham Radio Callsign Database - Volume 9.iso
/
pc
/
files
/
t_docs
/
connex.txt
< prev
next >
Wrap
Text File
|
1996-06-24
|
24KB
|
435 lines
.TL
Amateur Packet Radio and TCP/IP
.AU
Phil Karn, KA9Q
.NH
Introduction - What's Special About Amateur Packet Radio?
.PP
A new and rapidly growing activity within amateur (ham) radio is packet
radio. From a small-scale experimental beginning in the early 1980s, an
estimated 30,000 amateurs around the world now own equipment capable of
reliably sending digital data over the air. [KARN]
.PP
Of course, hams did not invent packet radio; the Aloha experiments in
Hawaii predated the earliest amateur networks by almost a decade.
However, amateur packet radio is noteworthy for the following reasons:
.IP [1]
Amateur radio operation requires an FCC license, granted only to
applicants passing tests in Morse code, radio and electronics theory,
and FCC rules and regulations. Once licensed, however, a ham has easy
access to a wide range of radio frequency bands, from just above the AM
broadcast band well up into the microwave region. Within broad policy
and technical limits established by FCC rules, amateurs have
considerable freedom to experiment. Frequency coordination within the
amateur bands is handled largely by the amateurs themselves, in strong
contrast to the various non-amateur, non-military packet radio
experiments that often appear inhibited by regulatory red tape.
.IP [2]
Amateur radio includes many operating modes and propagation
techniques. Packet radio coexists with more traditional modes such as
analog voice (single-sideband and FM), Morse code, facsimile,
radioteletype and television. Signals are propagated directly or by the
ionosphere, orbiting satellite or local hilltop repeater, and even the
moon is occasionally used as a passive reflector! These modes support a
broad range of applications, from casual socializing to technical
experimentation for its own sake to public service in time of emergency.
Business use (profit or non-profit) is prohibited, however, and amateurs
may not charge or accept payment for the communication services they
provide.
.IP [3]
Similarly, the amateurs themselves are a varied lot. Some are
communications professionals but many are not. Amateur radio has a
strong tradition of close-knit volunteer cooperation, strengthened by
the knowledge that no one will profit financially from the efforts of
others, at least not directly. Amateurs therefore must be strongly
motivated by an interest in communications technology for its own
sake. There is a strong parallel between many amateur packet radio
experimenters and the early university computer science researchers
described in Steven Levy's book "Hackers" [LEVY]; indeed, many \fIare\fR
.FS
Here I mean the original meaning of the word: one who loves
computer programming for its own sake, not one who gains unauthorized
access to computers.
.FE
computer hackers \** in their own right, because many of the same skills are
required.
.IP [4]
Amateur radio equipment is extremely inexpensive by commercial and
military standards because it must be affordable by ordinary individuals
to whom communications and computer networking is a hobby, not a
profession. As a new mode, amateur packet radio has emphasized using
equipment the average amateur is already likely to have: a voice
transceiver, a terminal or small personal computer. The initial
emphasis has been on low cost rather than performance and efficiency.
.NH
The State of Amateur Packet Radio
.PP
The packet radio techniques now in widespread amateur use reflects this
philosophy. Almost all VHF/UHF amateur packet radio currently uses Bell
202-compatible modems, as the 1200/2200 Hz frequency-shift-keyed (FSK)
tones they produce are easily fed into standard FM voiceband radios. On
HF (the so-called "short wave bands" below 30 Mhz) a crowded spectrum
calls for more efficiency: standard FSK radioteletype modems with 170 Hz
shift are used with single sideband (SSB) radios. A major development
is now underway that will apply digital signal processing (DSP) to
amateur radio, with a major goal being the creation of more efficient
low speed HF modems.
.PP
When amateur packet radio began, there were few users and personal
computers were much rarer than "dumb terminals." Slow modems could
support the simple keyboard-to-keyboard "chatting" that was the usual
operating style. Increased activity along with the need to transfer
electronic mail and other files has spurred development of higher speed
modems. One newly available unit uses MSK (Minimum Shift Keying) and
operates at 56 kilobits/sec. Such modems are restricted to the higher
frequency bands because of the bandwidth required.
.PP
The packet radio modem is generally incorporated into a special-purpose
box called, for historical reasons, a Terminal Node Controller (TNC).
TNCs also contain single-board computers with the necessary firmware to
execute the packet protocols. One port on the TNC connects to the
radio's audio I/O and push-to-talk leads, while an RS-232 connection is
provided for the host terminal or computer. A TNC is generally about
the same size as a small telephone modem, although one new Japanese
model is not much larger than a typical RS-232 "null modem." Lately HDLC
adapter/modem cards for standard personal computers have appeared,
eliminating the need for separate TNCs altogether.
.NH
Radio Is Not Wire
.PP
It must be emphasized that the packet radio channel is radically
different from the far more benign wire or fiber transmission
path, and this heavily influences the design of a network and
its lower-level protocols. Although
a collection of
packet radio stations operating on a single, shared frequency channel
bears a strong resemblance to multiple-access local area
networks such as Ethernet (which, conversely, has been described as
"packet radio on a cable") there are some important differences.
.IP [1]
Not every station can hear the transmissions of every other
station. This violates a fundamental assumption of the
Carrier Sense Multiple Access (CSMA) technique, namely the ability to
defer transmitting when another station is already using the channel.
This is known as the "Hidden Terminal" problem and it can severely
degrade the network's efficiency.
.IP [2]
It is impossible for a station to monitor the channel while
transmitting because of the enormous difference between received and
transmitted signal levels (150 dB is typical). This rules out
collision detection a la Ethernet.
.IP [3]
Depending on the modem hardware and RF path,
the bit error rate of the channel
may range from somewhat worse to much worse
than a wire or fiber path.
.IP [4]
Due to bandwidth and power limitations, the signaling speed of the
packet channel is usually much lower than a local area network.
.PP
Attacking these problems is now a major effort within amateur packet
radio. For example, it is possible to eliminate hidden terminals and to
detect collisions if a full duplex RF repeater is used so that the
stations can transmit and receive on separate frequencies
simultaneously. Or the network can be engineered such that each
transmitter is assigned its own frequency, with each node listening to
its neighbors with separate receivers.
.NH
Amateur Packet Radio Link Protocols
.PP
Since 1982, the standard amateur link level protocol has been "AX.25".
[ARRL82] It must be stressed that this name is somewhat of a misnomer;
unlike BX.25 ("Bell System X.25"), AX.25 it is \fInot\fR compatible with
CCITT X.25. AX.25 was custom-designed for amateur radio, although it
does incorporate many elements of X.25's link layer, LAPB (Link Access
Procedures Balanced).
.PP
As in X.25, AX.25 packets are sent synchronously in HDLC frames. (At
1200 baud, the lack of start and stop bits gives a welcome, though
modest, performance improvement!) Since AX.25 is used on a shared-access
channel, half-duplex operation is the norm. A datagram-style address
header is included in the beginning of each frame. As a minimum, the
header contains the FCC-assigned callsigns of the destination and source
stations in ASCII; this has the side benefit of satisfying FCC
identification rules. Beyond the source field may be up to eight
"digipeater" addresses. A digipeater is an intermediate station capable
of receiving, storing and retransmitting a packet, usually on the same
frequency. Strict source routing is used, i.e., the sender must specify
the entire digipeater string.
.PP
Beyond the address field is the LAPB control field and a protocol ID
(PID) byte. The PID corresponds to the TYPE field in Ethernet; it
specifies the upper level protocol is in use. The most common PID now
in use is F0 hex, which means "no upper level protocol, send data to the
terminal." Much "packeting" goes on with no more protocol mechanism than
this.
.NH
Higher Level Protocols
.PP
Lately there has been much experimentation with higher level protocols
on top of AX.25. In addition to the DARPA Internet suite, several
other efforts are underway.
.NH 2
NET/ROM
.PP
The most popular implementation at present is a commercial product of
Software 2000, Inc., and is called NET/ROM. [BUSCH] This is a special ROM
that replaces the standard firmware in a TNC, turning it into a terminal
switch. Users with conventional TNC software connect to a NET/ROM server
node and may issue commands to connect to remote nodes and users.
Internally, NET/ROM uses proprietary protocols: a connection-oriented
"transport" protocol atop a connectionless network layer protocol.
Automatic routing broadcasts establish network connectivity. Externally,
however, NET/ROM presents only a connection-oriented service, concatenating
its transport connections with a single AX.25 connection from each user.
Compatibility with existing packet stations and software is maintained at
the cost of sacrificing true end-to-end reliability and requiring the user
to learn NET/ROM commands and a certain amount of network topology
information.
.NH 2
Other Efforts
.PP
Other projects include "ROSE," [BEATTIE] an implementation of the packet
layer from X.25, and TEXNET [MCDERMOTT]. The first components of ROSE are
in the initial debugging stages, and TEXNET is being deployed, primarily in
Texas and nearby areas.
.NH 2
TCP/IP on Amateur Packet Radio
.PP
The first amateur radio TCP/IP experiments were done by Richard Bisbey,
NG6Q, with the ISI Amateur Radio Club, and Dave Mills, W3HCF. (Dave is well
known to the Internet community as the creator of the Fuzzball, Network Time
protocols, and a whole dictionary of colorful networking terms and
expressions). Both efforts adapted existing IP gateway hardware and
software to the task. Their work inspired me to create an Internet software
package specifically designed for amateur packet radio use, running on
hardware readily available to the average ham, and freely available in
source form for study and experimentation. [KARN85A]
.PP
The result of this successful effort, to which several volunteers have
made significant contributions, is the "KA9Q Internet Protocol Package."
[KARN87]
This software has now gained considerable operational experience. A class-A
network address (44) has been assigned to the Amateur Packet Radio (AMPR)
subnetwork and a domain name, ampr.org, has just been registered. This
reflects the international nature of amateur radio; several dozen countries
now have assignments in this address block. In the discussion that
follows, I will refer to this emerging TCP/IP-on-amateur-radio network as
AMPRNET (Amateur Packet Radio Network).
.NH 3
Amateur IP Addressing
.PP
One important characteristic of AMPRNET is that the normally sharp
distinction between Internet subnetworks is blurred. In the
standard Internet model, each subnetwork is a well defined entity, e.g., an
Ethernet LAN or ARPANET WAN, and each is fully interconnected internally,
logically if not physically. In contrast, AMPRNET consists of individual
stations and ad-hoc links, possibly unidirectional. In other words, AMPRNET
is a directed graph with individual stations, not fully connected
subnetworks, at the nodes, and this required some significant changes in the
interpretation of IP addresses.
.PP
I call the approach I took "generalized subnetting" [KARN85B] since it goes
beyond Internet standard subnetting, which only increased the number of
allowable levels in the Internet addressing hierarchy from two to three.
With generalized subnetting, the limit is 32, set by the number of bits in
an IP address. This scheme was invented independently for the Fuzzball IP
routers, and Comer calls it "Subnet Routing" ([COMER] page 202). The idea
is that each entry in the routing table contains its own subnet mask. A
routing lookup returns the matching table entry having the widest subnet
mask. There is \fIno\fR hardwired notion of an IP address "class" (A, B or
C) and the subnet mask corresponding to a given address's entry may be
different from one router to the next. This is a powerful technique,
in that it allows the construction of an arbitrary network topology while
still permitting the most compact routing table representation permitted by
the address assignment strategy. The ad-hoc "host specific" and "default"
routing entries supported by most gateways are no longer necessary, since
they are now merely special cases of a more general scheme. A host specific
routing entry has a subnet mask of all ones, while the default route has a
mask of all zeros. The default entry therefore matches any address, assuming
some other entry (with a wider mask) doesn't also match it.
.NH 3
The KA9Q Internet Protocol Package
.PP
Most Internet software packages for the PC generally support only one
application (server or client) at a time. The ease of implementing
custom applications is usually more important than the ability to
support multiple simultaneous sessions, since other, larger systems
running "real" operating systems (e.g., BSD UNIX and its derivatives)
are usually available elsewhere on the net. Suns and VAXes are still
rare in the amateur radio world, however, so my goal was to create a
usable network solely out of PC-class machines that could support at
least the basic Internet applications simultaneously.
.PP
Because PCs running MS-DOS don't support multitasking, however, I chose
to build a rudimentary form of multitasking into a single executable
program containing the protocol modules. Unfortunately, this does make
for an unusual programming environment. Each application is structured
as a state machine driven by external events. For example, a TCP
application is given three upcalls: receive data arrival, transmit data
acknowledgement, and TCP state change. The application is responsible
for maintaining its own state between upcalls, and it must process
upcalls without hogging or blocking the processor.
.PP
The KA9Q package supports the major DARPA Internet protocols: IP and ICMP
at the Internet layer, TCP and UDP at the Host-Host (Transport) layer,
and Telnet, FTP and SMTP at the Application layer. Multiple
simultaneous server and client sessions are supported, with the only
limit being available memory for control blocks and buffering.
.PP
The package supports several subnet protocols and interfaces, with more
under development. Ethernet (the 3-Com 3C501 interface) and SLIP (using
standard PC asynchronous ports) are supported.
.PP
Since the package was developed specifically for AMPRNET,
the AX.25 link level protocol is also incorporated. AX.25 may be
used alone (for compatibility with amateur stations that don't yet
support the Internet protocols) or as a subnet mechanism for carrying IP
datagrams. The subnet interface is straightforward, with ARP [RFC826]
used to map IP addresses into AX.25 callsigns. ARP works automatically
only when no digipeaters are involved; otherwise the mapping table must be
set manually.
.PP
AX.25 provides two forms of data encapsulation, the I (Information) and
the UI (Unnumbered Information) frames. The former mode includes link
level flow control and acknowledgement while the latter does not. This
recognizes that the quality of packet radio channels that make up AMPRNET
varies widely, ranging from fading, noisy 300 bps
channels on long haul HF bands to 56 kb/s line-of-sight paths on UHF
frequencies. Link level reliability mechanisms that are considered
essential for performance on HF introduce intolerable overhead on
reliable high speed links.
.PP
The Type-of-Service (TOS) bits in each IP datagram select one mode or
the other. (If no bits are set, a default mode is used). When I-frames
are selected, the capability of fragmenting large datagrams at the link
layer and immediately reassembling them at the other end of the link is
also available. This follows the recommendation in [KENT] to avoid
excessive IP level fragmentation by providing transparent subnet
fragmentation whenever the subnet maximum transmission unit (MTU) would
otherwise be unusually small. This facility is not available in UI
mode, but this is acceptable since UI mode would only be used on high
quality channels where large packets are already in use.
.NH
Contributions of Amateur Packet Radio to Internetworking
.PP
1200 baud amateur packet radio clearly represents the low end of the
performance spectrum of subnetworks that now support the Internet
protocols. In the words of Mike O'Dell (also a ham, with callsign
N4NLN), AMPRNET currently holds TCP/IP's "worst wire"
award. Frustration with the poor performance of existing TCP
implementations over packet radio (primarily the fault of poor
retransmission algorithms) motivated me to work in this area with Van
Jacobsen and Craig Partridge. My experiences have made me somewhat of a
radical, particularly when I see other implementors making arbitrary
assumptions about the longest possible Internet round-trip time, or
minimum subnet throughput, or maximum packet loss rate. The KA9Q TCP
has the Van Jacobsen congestion control algorithms, plus my own
heuristic for ensuring the accuracy of round trip time measurements in
the face of retransmissions, and they work well over the air. In
keeping with the principle of "no arbitrary limits," there is no
"give-up timer" or clipping of round trip estimates. Retransmissions
may occur indefinitely, subject to a back-off algorithm, of course; the
decision to abort a connection is left up to the application or the
human user.
.PP
Because of its geographic dispersion, AMPRNET at present
consists largely of isolated areas of activity. It is \fInot\fR
interconnected with the DARPA Internet, nor does it use any other
government resources, so low cost commercial facilities (e.g., Telenet's
PC Pursuit) have instead been used to link these "islands" on a part
time basis with good results. There seems to be considerable potential
here to build an ad-hoc Internet out of available
facilities, thus satisfying a major reason that amateur radio exists:
public service, particularly in emergency communications.
.PP
Our experiences with TCP/IP over amateur packet radio have contributed
to the Internet effort as a whole by expanding the performance range of
networks over which the protocols can operate. We have encountered and
attacked problems that the rest of the Internet community has not had to
face, but these solutions are now available should they be needed. In
this way, amateur radio's charter for contributing to the state of the
communication art is also fulfilled.
.NH
Availability of the KA9Q Internet Protocol Package
.PP
The KA9Q Internet Package is not public domain, but it is available by
anonymous FTP for free noncommercial use. It may be obtained from
louie.udel.edu (10.0.0.96) under /pub/ka9q as a collection of ARC format
archives. Source, executables and documentation is provided. Although
the primary execution environment is MS-DOS on the IBM PC and clones,
the code has been ported to a variety of machines including the Apple
Macintosh, the Commodore Amiga, the Atari ST, and various flavors of
UNIX System V. Although feedback and suggestions are welcome, this is a
volunteer project so no warranties or guarantees can be offered.
.SH
References
.IP 1.
[ARRL82] Fox, T., ed., Amateur Packet Radio Link Layer Protocol AX.25,
American Radio Relay League.
.IP 2.
[BEATTIE] Beattie, G., OSI: A Plan Comes Together, Proceedings of the
6th ARRL Amateur Radio Computer Networking Conference, ARRL 1987.
.IP 3.
[BUSCH] Busch, M. and Raikes, R., NET/ROM Version 1.0 User's Manual.
Software 2000, Inc. 1987.
.IP 4..
[COMER] Comer, D., Internetworking with TCP/IP. Prentice Hall 1988.
ISBN 0-13-470154-2.
.IP 5.
[KARN85] Karn, P., Price, H., and Diersing, R., Packet radio in the
Amateur Service, IEEE Journal on Selected Areas in Communications, May
1985.
.IP 6.
[KARN85A]
Karn, P., TCP/IP: A Proposal for Amateur Packet Radio Levels 4 and 3.
Proceedings of the
4th ARRL Amateur Radio Computer Networking Conference, ARRL 1985.
.IP 7.
[KARN85B]
Karn, P., Addressing and Routing Issues in Amateur Packet Radio,
Proceedings of the
4th ARRL Amateur Radio Computer Networking Conference, ARRL 1985.
.IP 8.
[KARN87]
Karn, P., The KA9Q Internet (TCP/IP) Package: A Progress Report.
Proceedings of the
6th ARRL Amateur Radio Computer Networking Conference, ARRL 1987.
.IP 9.
[KENT] Kent, C., and Mogul, J., Fragmentation Considered Harmful,
Proceedings of ACM SIGCOMM 1987.
.IP 10.
[LEVY] Levy, S., Hackers. Dell 1984, ISBN 0-440-13405-6.
.IP 11.
[MCDERMOTT] McDermott, T., Overview of the TEXNET datagram protocol,
Proceedings of the
6th ARRL Amateur Radio Computer Networking Conference, ARRL 1987.
.IP 12.
[RFC826] Plummer, D., An Ethernet Address Resolution Protocol, ARPA RFC 826.
.SH
Biography
.PP
Phil Karn received his BSEE from Cornell University in 1978 and his MSEE
(Computer Engineering) from CMU in 1979. After graduating, Phil worked
at Bell Laboratories in Naperville, Illinois and Murray Hill,
New Jersey. With the breakup of the Bell System in 1984, Phil went to
work for Bellcore in Morristown, New Jersey. He is now a Member
of the Technical Staff doing research into protocols for high speed
fiber-based packet switching networks.
.PP
Phil's interest in TCP/IP comes from two separate directions: amateur
packet radio, and the large (about 1000 hosts) Internet he helped
build and manage within Bellcore. Phil has been a licensed radio
amateur since 1971, and his interests there lie almost completely in the
area of technical experimentation and development. Phil is a member of
the board of directors of Tucson Amateur Packet Radio (TAPR), the
non-profit corporation largely responsible for making packet technology
widely available to radio amateurs. He also sits on the Digital
Communications Committee of the American Radio Relay League (ARRL), the
US national amateur radio organization.
.PP
In addition to terrestrial packet radio, Phil participates in the Radio
Amateur Satellite Corporation (AMSAT), a group of volunteers that
designs, builds and operates its own earth-orbiting satellites,
including several that feature packet switched communications.